package com.sz.common.core.system.service.impl;

import com.sz.common.base.service.AbstractService;
import com.sz.common.core.system.entity.SysLanguage;
import com.sz.common.core.system.service.SysLanguageService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Function: SysLanguageServiceImpl <br>
 * Author: Charles <br>
 * Date: 2016-11-29 15:27:00
 */
@Service
public class SysLanguageServiceImpl extends AbstractService implements SysLanguageService {

    /**
     * @return
     */
    @Override
    public List<SysLanguage> getLanguages() {
        return this.dao.findForList(getSqlName("selectVisibleLangs"), null, SysLanguage.class);
    }

    /**
     * 获取所有除过简体中文之外可用的语言
     *
     * @return
     */
    @Override
    public List<SysLanguage> getNoSimpleChineseLanguages() {
        return this.dao.findForList(getSqlName("selectNoZhCnVisiblelangs"), null, SysLanguage.class);
    }

    @Override
    protected String getMapperNamespace() {
        return "com.sz.common.core.system.mapper.SysLanguageMapper";
    }
}
